//
//  HRMessageButton.m
//  Hear
//
//  Created by mac on 2017/5/12.
//  Copyright © 2017年 mac. All rights reserved.
//

#import "HRMessageButton.h"

@implementation HRMessageButton

-(instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self)
    {
        self.circleLable = [UILabel new];
        self.circleLable.frame = CGRectMake(frame.size.width-3, -5, 9, 9);
        self.circleLable.backgroundColor = CustomColor(246, 60, 60, 1);
        self.circleLable.textColor = [UIColor whiteColor];
        self.circleLable.font = [UIFont systemFontOfSize:13];
        self.circleLable.textAlignment = NSTextAlignmentCenter;
        self.circleLable.layer.cornerRadius = self.circleLable.width * 0.5;
        self.circleLable.layer.masksToBounds = YES;
        [self addSubview:self.circleLable];
        
        if ([[NSUserDefaults standardUserDefaults] boolForKey:@"newMessageNotifi"]){
            self.circleLable.hidden = NO;
        }else{
            self.circleLable.hidden = YES;
        }
        
    }
    return self;
}


@end
